package edu.qichen.onlineBlog.log.controller;

import edu.qichen.onlineBlog.framework.DataResult;
import edu.qichen.onlineBlog.log.service.LoginLogService;
import edu.qichen.onlineBlog.log.vo.PageLoginLogRes;
import edu.qichen.onlineBlog.log.vo.PageLoginLogReq;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能:
 * 作者:程序员欧阳子韩
 * 日期:2024/6/23 18:34
 */
@RestController
@RequestMapping("/log")
@Tag(name = "登录日志")
public class LoginLogController {
    @Resource
    private LoginLogService loginLogService;

    @PostMapping("/logPage")
    @Operation(summary = "登录日志分页")
    public DataResult<PageLoginLogRes> userPage(@RequestBody PageLoginLogReq pageLoginLogReq) {
        return DataResult.success(loginLogService.selectPage(pageLoginLogReq));
    }
}
